package com.wuze.cloud.dao;

import com.wuze.cloud.pojo.SysRecyclingDO;
import com.wuze.cloud.request.SysRecyclingQuery;
import com.wuze.cloud.request.SysRestoreOrDelQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author wuze
 * @Date 2023/5/9 21:03
 * @ClassName: SysRecyclingDao
 * @Description: TODO
 */
@Repository
public interface SysRecyclingDao {

    List<SysRecyclingDO> findByPage(@Param("query") SysRecyclingQuery query);

    SysRecyclingDO findByFileId(@Param("fileId") Long fileId);

    Integer count(@Param("query") SysRecyclingQuery query);
    List<SysRecyclingDO> findListByState(@Param("state")String state);
    void add(@Param("recycling") SysRecyclingDO recycling);

    void batchDelByFolderIds(@Param("query") SysRestoreOrDelQuery query);

    void batchDelByFileIds(@Param("query") SysRestoreOrDelQuery query);

    void batchDelByFileIdsAdmin(@Param("fileIds") List<Long> fileIds);
    void batchDelByFolderIdsAdmin(@Param("folderIds") List<Long> folderIds);

    void batchUpdateStateByFolderIds(@Param("query") SysRestoreOrDelQuery query,@Param("state") String state);

    void batchUpdateStateByFileIds(@Param("query") SysRestoreOrDelQuery query,@Param("state") String state);

}
